<%- include header %>
<div class="row js-panel-row">
    <div class="col-sm-12 col-xs-12 no-padding">
        <ol class="breadcrumb">
            <li><a href="/" title="首页">首页</a></li>
            <li>
                <a href="/content/category?categoryId=<%= doc.category %>&page=1"
                   title="<%= doc.categoryName %>"><%= doc.categoryName %></a>
            </li>
            <li><a href="/content/detail?id=<%= doc._id %>&view=contentDetail"
                   title="<%= doc.name %>"><%= doc.name %></a></li>
            <li class="active">编辑</li>
        </ol>
        <div class="panel panel-default">
            <div class="panel-heading">编辑日志</div>
            <div class="panel-body">
                <form role="form" action="javascript:;">
                    <div class="form-group">
                        <label class="l-margin-top-17">标题</label>
                        <i class="pull-right text-primary">您还可以输入 <i
                                    class="number js-content-name-chars">100</i> 个字符</i>
                        <input type="text" class="form-control js-add-content-name" data-id="<%= doc._id %>"
                               placeholder="日志标题"
                               autofocus maxlength="100" data-name="<%= doc.name %>"
                               value="<%= doc.name %>"/>
                    </div>
                    <div class="form-group">
                        <label>内容</label>
                        <%- include editor %>

                    </div>
                    <div class="form-group">
                        <label>分类</label>
                        <select class="form-control js-category-value l-select">
                        </select>
                    </div>
                    <div class="form-group">
                        <label>原文<span class="text-muted">(置空则为原创)</span></label>
                        <input type="text" class="form-control" name="original" placeholder="原文链接"
                               value="<%= (doc.original) ? doc.original : '' %>"/>
                    </div>
                    <div class="form-group">
                        <div class="l-padding-vertical">
                            <button type="submit"
                                    class="btn btn-primary col-sm-1 col-xs-12 pull-right  js-save-content">编辑日志
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<input type="hidden" value="<%= doc.category %>" class="js-edit-content-category"/>
<input type="hidden" class="js-current-menu" value="js-my-content-menu"/>
<%- include footer %>
